/*
 * AesSwitchEncrypter.h
 *
 *  Created on: Aug 15, 2010
 *      Author: lukasz
 */

#ifndef AESSWITCHENCRYPTER_H_
#define AESSWITCHENCRYPTER_H_

#ifndef AESENCRYPTER_H_
#include "Encrypter.h"
#endif

#include "OpenSSLAESEncrypter.h"
#include "CUDAAESEncrypter.h"

class AesSwitchEncrypter : public AESEncrypter
{
public:
	AesSwitchEncrypter(BigInteger& init_vector, byte* key);
	virtual ~AesSwitchEncrypter();

	virtual void* encrypt(const void* inbuffer, uint32_t size, uint32_t nr);
	virtual void* decrypt(const void* buffer, uint32_t size, uint32_t nr);
private:
	OpenSSLAESEncrypter d_cpuEncrypter;


#ifndef NOCUDA
	CUDAAESEncrypter	 d_gpuEncryter;
#endif
	AESEncrypter* p_curEncrypter;
};

#endif /* AESSWITCHENCRYPTER_H_ */
